$(function () {
    $.ajaxSetup({
        async:false
    });
    $.post("/outOfStock/findAll",null,function (info) {
        let str = "";
        for(let i=0; i<info.length;i++){
            str += `<option value="${info[i].id}">${info[i].name}</option>`;
        }
        $("#clientSelect").html(str);
    });
    $.ajaxSetup({
        async:true
    });
    changeDept();


});

function changeClient() {

}

function addCommodity() {
    layui.use('layer', function() {
        var layer = layui.layer;

        layer.open({
            title:"添加出库商品",
            type:1,
            shadeClose:true,
            skin:'layui-layer-rim',
            area:['800px','600px'],
            anim:4,
            content:$("#addDiv")
        });
    })

}

function outOfStock() {
    layui.use('layer', function(){
        var layer = layui.layer;

        layer.open({
            type:1,
            shadeClose:true,
            skin:'layui-layer-rim',
            area:['200px','200px'],
            anim:4,
            content:$("#outOfStockDiv")
        });
    });

}